<template>
	<view class="beijingse">
		<view class="block1 mainpadding">
			<view class="flexbetween">
				<view class="ershib">合计：
					<text class="chanpinse">￥{{userinfo.total_withdrawal_price}}</text>
				</view>
			</view>
		</view>
		<view class="flexcenter" style="padding-top: 200rpx;" v-if="!list.data.length">
			<view class="placeimage"></view>
		</view>
		<view class="" v-if="list.data.length">
			<view class="ffffff mainpadding2">
				<view class="xiahuaxian padding_top" v-for="item in list.data" :key="item.id">
					<view class="flexbetween ">
						<view class="chanpinse">{{item.price}}</view>
						<view class="huisetext" v-show="item.status==1">已到账</view>
						<view class="huisetext" v-show="item.status==3">已驳回</view>
						<view class="huisetext" v-show="item.status==0">待审核</view>
					</view>
					<view class="huisetext margin_top1">{{item.createtime_text}}</view>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				userinfo: {},
				page: 1,
				limit: 12,
				list: {
					data: [{}]
				},
			}
		},
		onShow() {
			this.init()
			this.getinfo()
		},
		methods: {
			//用户信息
			getinfo() {
				httpRequest.request('/api/user/index', 'GET', {}).then(res => {
					 
					this.userinfo = res.data
				})
			},
			init(isPage, page) { //提现记录
				let _this = this;
				httpRequest.request('/api/user/getWithdrawalList', 'GET', {
					page: page || 1,
					limit: _this.limit,
				}, false, false, true).then(res => {
					if (res.code == 1) {
						let resList = res.data;
						let dataList = _this.list;
						if (isPage == true) {
							_this.list.data = dataList.data.concat(resList.data);
						} else {
							this.list = res.data
							_this.list.data = resList.data;
						}
					}
				}).catch(err => {
					httpRequest.toast(err.msg);
				})
			},
			onReachBottom() {
				let _this = this;
				let list = _this.list;
				let page = _this.page;
				if (list.last_page <= page) {
					return false;
				}
				page++;
				_this.page = page;
				_this.init(true, page);
			},

		}
	}

</script>
<style lang="scss" scoped>
	.chanpinse {
		font-size: 32rpx;
		font-family: DIN Next LT Pro-Bold, DIN Next LT Pro;
		font-weight: bold;
		color: #228DFF;
	}

	.kym {
		margin: 250rpx auto 0;
		width: 343rpx;
		height: 324rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.xian {
		width: 22rpx;
		height: 0rpx;
		background-color: #999999;
		border: 1rpx solid #999999;
	}

	.shijianbtn {
		padding: 20rpx 65rpx;
		background: #F7F9FA;
		border-radius: 41rpx;
		font-size: 28rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #999999;
	}

	.huisebtn {
		width: 198rpx;
		height: 80rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 28rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #999999;
		background: #F7F9FA;
		border-radius: 41rpx;
	}

	.haungsebtn {
		width: 198rpx;
		height: 80rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 28rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #EF8933;
		background: rgba(239, 137, 51, .1);
		border-radius: 41rpx;
	}

	.sanshi {
		width: 33.33%;
	}

</style>
<style lang="scss" scoped>
	.huisetext {
		font-size: 24rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #999999;
	}

	.xiahuaxian:last-child {
		padding-bottom: 0rpx;
		border-bottom: none;
	}

	.xiahuaxian {
		padding-bottom: 30rpx;
		border-bottom: 2rpx solid rgba(0, 0, 0, 0.05);
	}

	.bigcstext {
		font-size: 32rpx;
		font-family: DIN Next LT Pro-Bold, DIN Next LT Pro;
		font-weight: bold;
		color: #228DFF;
	}


	.ershib {
		font-size: 28rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #000000;
	}

	.chengsetext {
		font-size: 28rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #228DFF;
	}

</style>

